﻿using Domain.Entity.bs;
using Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.ProductService
{
    public interface IProductService
    {

        //分页查询货品信息
        Task<FenYe<Product>> GetProduct(FenYe<Product> fenYe, string? name, bool? inventory, int? whid, string? type);

        //添加货品信息
        Task<int> AddProduct(AddProductDto addProductDto);

        //删除货品信息
        Task<int> DeleteProduct(int id);

        //查询所有货品信息
        Task<List<Product>> GetAllProduct();

        //根据id查询货品信息
        Task<Product> GetProductById(int id);

        //修改货品信息
        Task<int> UpdateProduct(UpdateProductDto updateProductDto);

        //修改货品信息状态(启用/停用)
        Task<int> UpdateStatus(int procid, int status);

        //分页高级查询
        Task<FenYe<Product>> GetAdvancedProduct(FenYe<Product> fenYe, string? code, string? name, string? typeid, string? model, string? unit, string? startinprice, string? endinprice, string? startoutprice, string? endoutprice, int? is_datamanagement, int? status, int? startwarningdays, int? endwarningdays, int? whid, string? barcode, string? starttime, string? endtime, string? createname);

        //修改货品计划可用库存
        Task<int> Updateky(int id, int inventory);

        //更新货品总库存与总金额
        Task<int> Updateinventory(UpdateinventoryDto updateinventoryDto);


        //更新货品总库存与总金额(出库)
        Task<int> UpdateinventoryJian(UpdateinventoryDto updateinventoryDto);

        //通过查询到的库存查货物
        Task<FenYe<ProductWithStocks>> GetProductsByIds(int CurrentPage, int wh_id, string? proc_code, string? proc_primary_unit);

        //根据货品id批量获取
        Task<List<Product>> GetProductsByIds(int[] proc_ids);
    }
}
